package demo1;

import java.io.FileReader;
import java.io.IOException;
import java.io.Reader;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 石方旭
 * Date: 2022-08-09
 * Time: 9:54
 */
public class TestDemo6 {
    public static void main(String[] args) {
        try(Reader reader = new FileReader("text.txt")){
            char[] chars = new char[1024];
            int len = reader.read(chars);
            for(int i =0;i<len;++i){
                System.out.println(chars[i]);
            }
        }catch(IOException e){
            e.printStackTrace();
        }
    }
}
